//载入那些函数库
let includes = ([
    "include/common.js",
]);

let inherits = ([
    "inherit/data.js",
]);

function create() {
    return thisObject;
}






function main(me, arg) {

    let exits;
    if (arg == "") {
        tellObject(me, "你要往哪个方向走？").to();
        return;
    }

    env = environment(me);
    if (!objectp(env)) {
        tellObject(me, "你哪儿也去不了..").to();
        return;
    }

    if (undefinedp(exits = env.get("exits"))) {
        tellObject(me, "这个房间没有出口..").to();
        return;
    }

    if (!Object.keys(exits).includes(arg)) {
        tellObject(me, "都没有这个出口！..").to();
        return;
    }

    let room = exits[arg];



    //这种情况是  west:""
    if (room == "") {
        tellObject(me, "这个方向没有出口..").to();
        return;
    }

    room = loadObject(room, 1);
    me.move(room);

    tellObject(me, sprintf("你来到了{0}", room.get("name"))).to();

  //  command(me,"look");



    return;
}


